<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD><TITLE>个人资料</TITLE>
		<META charset=utf-8>
			<META name=viewport content="width=device-width, user-scalable=no, initial-scale=1">
				<LINK rel="stylesheet" href="__ROOT__/static/jquery.mobile-1.3.2.css">
					<SCRIPT src="__ROOT__/static/jquery-1.10.2.js"></SCRIPT>
					<SCRIPT src="__ROOT__/static/jquery.mobile-1.3.2.js"></SCRIPT>
					<script type="text/javascript">
					$(document).ready(function(){
						$("#submitBTN").click(function(){
							htmlobj=$.ajax({url:"{:u("update","","")}",type: "POST",
								data: "realname="+$("#realname").val()+"&phonenumber="+$("#phonenumber").val()+"&openid="+$("#openid").val()+"&address="+$("#address").val(),
								async:false});
							alert(htmlobj.responseText);
						});
					});
					</script>
				</HEAD>



				<BODY>
					<script type="text/javascript">
					document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
						WeixinJSBridge.call('hideOptionMenu');
					});
					document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
						WeixinJSBridge.call('hideToolbar');
					});
					</script>

					<div data-role="page" id="UserinfoPage">
						<div data-role="content">
							<div style=" text-align:center">
								<img style="width: 50%; height: %" src="<?php echo $userinfo["headimgurl"];?>">
							</div>
							
							<UL data-role="listview" data-inset="true">
								<LI>
									<P>
										<div class="fieldcontain">
											<label for="nickname">昵称</label>
											<input name="nickname" id="nickname" value="<?php echo $nickname;?>" type="text"  disabled="disabled>
										</div>
										<div class="fieldcontain">
											<label for="sex">性别</label>
											<input name="sex" id="sex" value="<?php echo sexis($sex);?>" type="text" disabled="disabled">
										</div>

										<div class="fieldcontain">
											<label for="realname">真实姓名</label>
											<input name="realname" id="realname" value="<?php echo $realname;?>" type="text">
											<input type="hidden" name="openid" id="openid" value="<?php echo $myopenid;?>">
										</div>
										<div class="fieldcontain">
											<label for="phonenumber">联系电话</label>
											<input name="phonenumber" id="phonenumber" value="<?php echo $phonenumber;?>" type="text">
										</div>
										<div class="fieldcontain">
											<label for="address">联系地址</label>
											<input name="address" id="address" value="<?php echo $address;?>" type="text">
										</div>
									</P>
								</LI>
							</UL>
							<div id="myDIV" class="fieldcontain"></div>
							<center><div class="fieldcontain" style="width: 50%;">
								<input id="submitBTN" type="submit" name="submitBTN" value="更新个人资料"/>
							</div></center>         
							
						</div>
						<div data-theme="a" data-role="footer" data-position="fixed">
							<h3></h3>
						</div>
					</div>
				</BODY>
			</HTML>